<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8"/>
		<meta name="keywords" content="大唐天宝,韩国代购,化妆品,菲诗小铺,彩妆"/>
		<link href="../public/stylesheet/style.css" type="text/css" rel="stylesheet"/>
		<link rel="stylesheet" href="../public/stylesheet/css/index.css" />
		<link rel="stylesheet" href="../public/stylesheet/list.css"/>
	</head>
	<body>
		<!--内容开始-->
		<div id="content">
			<!--头部开始-->
			<div id="header">
			<div id="header-top">
				<div class="header-top-left">
					<span class="side"><a href="register.php">注册</a></span><a href="../web/login.php"><?php echo (empty($_SESSION['user']))?'|登录':'';?></a>
					<span><a href="#">|收藏本站</a></span>
				</div>
				<div class="header-top-right">
					<div><a href="../web/shopping.php">我的订单</a></div>
					<div><a href="doaction.php?a=doLogout"><?php echo (!empty($_SESSION['user'])) ? '注销' : '';?></a></div>
					<div><a href="shopping.php"><?php echo (!empty($_SESSION['user'])) ? '购物车' : '';?></a></div>
					<div><a>客户服务</a></div>
					
				</div>
			</div>
			<div id="header-bottom">
				<div class="logol"><img src="../public/images/logol.png"/></div>
				<div class="search">
					<input class="input" type="text" name="search" placeholder="请输入内容">
					<div class="search-b"><a>热门搜索</a>
					<span class="search-text">
						<a>iPhone5</a>
						<a>	HASWELL处理器</a>
						<a>手机壳</a>
						<a>海信</a>
						<a>Galaxy S4 I9508</a>
					</span>
					
					</div>

				</div>
				<div class="tool">
					<div class="tool-l"><a href="../web/person.php">用户中心</a></div>
					<div class="tool-r"><a href="../web/cart.php">去购物车结算</a></div>
				</div>
			</div>
		</div>
			<!--头部结束-->
		<div id="body">
				<!--导航栏开始-->
				<div id="nav">
					<div id="nav-l" class="text"><strong>全部商品分类</strong></div>
					<div id="nav-r">
						<ul>
						<?php
					//引入配置文件
					include("config.php");
					//连接数据库
					$con=@mysql_connect(HOST,USER,PASS) or die('数据库连接失败！');
					//选择数据库并设置字符集
					mysql_select_db(DBNAME,$con);
					mysql_set_charset('utf8');
					//编写sql语句
					$catalog="select name,id from type where pid=0 limit 0,6";
					//执行sql语句
					$cataque=mysql_query($catalog);
					//遍历结果集
						echo "<li><a href='index.php'>首页</a></li>";
						while($catarow=mysql_fetch_assoc($cataque)){
							if($catarow['name']=="广告位")
								{
									echo '';
								}else{
									echo "<li><a href='list.php?id={$catarow['id']}'>{$catarow['name']}</a></li>";
								}
							}
						?>
						</ul>
					</div>
				</div>
				